#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# @Project : chat_model 
# @File    : knowledge_file_schema.py
# @IDE     : PyCharm 
# @Author  :ZH
# @Time    : 2025/1/10 16:48
from typing import List, Optional

from pydantic import Field, BaseModel
from datetime import datetime

from apps.utils.enumerate import KnowledgeFileStateEnum


class BaseKnowledgeFileSchema(BaseModel):
    file_name: str = Field(description='文件名称', title='file_name')
    file_size: int = Field(description='文件大小', title='file_size')
    file_hash: str = Field(description='文件hash', title='file_hash')
    file_address: str = Field(description='文件地址', title='file_address')
    knowledge_id: int = Field(description='知识库id', title='knowledge_id')
    user_id: int = Field(description='用户id', title='user_id')
    split_size: int = Field(description='分片大小', title='split_size')
    split_str: str = Field(description='分片字符串', title='split_str')
    file_extract_id: int = Field(description='文件抽取id', title='file_extract_id')
    state: KnowledgeFileStateEnum = Field(description='文件状态', title='state')


class CreateKnowledgeFileSchema(BaseModel):
    __doc__ = "创建知识库文件模式"


class UpdateKnowledgeFileSchema(BaseModel):
    __doc__ = "更新知识库文件模式"
